/*
 * An XML document type.
 * Localname: super-state
 * Namespace: urn:jbpm.org:jpdl-3.2
 * Java type: x2.orgJpdl3.jbpm.SuperStateDocument
 *
 * Automatically generated - do not modify.
 */
package x2.orgJpdl3.jbpm.impl;
/**
 * A document containing one super-state(@urn:jbpm.org:jpdl-3.2) element.
 *
 * This is a complex type.
 */
public class SuperStateDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.SuperStateDocument
{
    private static final long serialVersionUID = 1L;
    
    public SuperStateDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SUPERSTATE$0 = 
        new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "super-state");
    
    
    /**
     * Gets the "super-state" element
     */
    public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState getSuperState()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
            target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().find_element_user(SUPERSTATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "super-state" element
     */
    public void setSuperState(x2.orgJpdl3.jbpm.SuperStateDocument.SuperState superState)
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
            target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().find_element_user(SUPERSTATE$0, 0);
            if (target == null)
            {
                target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().add_element_user(SUPERSTATE$0);
            }
            target.set(superState);
        }
    }
    
    /**
     * Appends and returns a new empty "super-state" element
     */
    public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState addNewSuperState()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
            target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().add_element_user(SUPERSTATE$0);
            return target;
        }
    }
    /**
     * An XML super-state(@urn:jbpm.org:jpdl-3.2).
     *
     * This is a complex type.
     */
    public static class SuperStateImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.SuperStateDocument.SuperState
    {
        private static final long serialVersionUID = 1L;
        
        public SuperStateImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName NODE$0 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "node");
        private static final javax.xml.namespace.QName STATE$2 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "state");
        private static final javax.xml.namespace.QName TASKNODE$4 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "task-node");
        private static final javax.xml.namespace.QName SUPERSTATE$6 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "super-state");
        private static final javax.xml.namespace.QName PROCESSSTATE$8 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "process-state");
        private static final javax.xml.namespace.QName FORK$10 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "fork");
        private static final javax.xml.namespace.QName JOIN$12 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "join");
        private static final javax.xml.namespace.QName DECISION$14 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "decision");
        private static final javax.xml.namespace.QName ENDSTATE$16 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "end-state");
        private static final javax.xml.namespace.QName MAILNODE$18 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "mail-node");
        private static final javax.xml.namespace.QName DESCRIPTION$20 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "description");
        private static final javax.xml.namespace.QName EVENT$22 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "event");
        private static final javax.xml.namespace.QName EXCEPTIONHANDLER$24 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "exception-handler");
        private static final javax.xml.namespace.QName TIMER$26 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "timer");
        private static final javax.xml.namespace.QName TRANSITION$28 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "transition");
        private static final javax.xml.namespace.QName NAME$30 = 
            new javax.xml.namespace.QName("", "name");
        private static final javax.xml.namespace.QName ASYNC$32 = 
            new javax.xml.namespace.QName("", "async");
        
        
        /**
         * Gets a List of "node" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.NodeDocument.Node> getNodeList()
        {
            final class NodeList extends java.util.AbstractList<x2.orgJpdl3.jbpm.NodeDocument.Node>
            {
                public x2.orgJpdl3.jbpm.NodeDocument.Node get(int i)
                    { return SuperStateImpl.this.getNodeArray(i); }
                
                public x2.orgJpdl3.jbpm.NodeDocument.Node set(int i, x2.orgJpdl3.jbpm.NodeDocument.Node o)
                {
                    x2.orgJpdl3.jbpm.NodeDocument.Node old = SuperStateImpl.this.getNodeArray(i);
                    SuperStateImpl.this.setNodeArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.NodeDocument.Node o)
                    { SuperStateImpl.this.insertNewNode(i).set(o); }
                
                public x2.orgJpdl3.jbpm.NodeDocument.Node remove(int i)
                {
                    x2.orgJpdl3.jbpm.NodeDocument.Node old = SuperStateImpl.this.getNodeArray(i);
                    SuperStateImpl.this.removeNode(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfNodeArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new NodeList();
            }
        }
        
        /**
         * Gets array of all "node" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.NodeDocument.Node[] getNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.NodeDocument.Node> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.NodeDocument.Node>();
                get_store().find_all_element_users(NODE$0, targetList);
                x2.orgJpdl3.jbpm.NodeDocument.Node[] result = new x2.orgJpdl3.jbpm.NodeDocument.Node[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "node" element
         */
        public x2.orgJpdl3.jbpm.NodeDocument.Node getNodeArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.NodeDocument.Node target = null;
                target = (x2.orgJpdl3.jbpm.NodeDocument.Node)get_store().find_element_user(NODE$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "node" element
         */
        public int sizeOfNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(NODE$0);
            }
        }
        
        /**
         * Sets array of all "node" element
         */
        public void setNodeArray(x2.orgJpdl3.jbpm.NodeDocument.Node[] nodeArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(nodeArray, NODE$0);
            }
        }
        
        /**
         * Sets ith "node" element
         */
        public void setNodeArray(int i, x2.orgJpdl3.jbpm.NodeDocument.Node node)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.NodeDocument.Node target = null;
                target = (x2.orgJpdl3.jbpm.NodeDocument.Node)get_store().find_element_user(NODE$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(node);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "node" element
         */
        public x2.orgJpdl3.jbpm.NodeDocument.Node insertNewNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.NodeDocument.Node target = null;
                target = (x2.orgJpdl3.jbpm.NodeDocument.Node)get_store().insert_element_user(NODE$0, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "node" element
         */
        public x2.orgJpdl3.jbpm.NodeDocument.Node addNewNode()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.NodeDocument.Node target = null;
                target = (x2.orgJpdl3.jbpm.NodeDocument.Node)get_store().add_element_user(NODE$0);
                return target;
            }
        }
        
        /**
         * Removes the ith "node" element
         */
        public void removeNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(NODE$0, i);
            }
        }
        
        /**
         * Gets a List of "state" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.StateDocument.State> getStateList()
        {
            final class StateList extends java.util.AbstractList<x2.orgJpdl3.jbpm.StateDocument.State>
            {
                public x2.orgJpdl3.jbpm.StateDocument.State get(int i)
                    { return SuperStateImpl.this.getStateArray(i); }
                
                public x2.orgJpdl3.jbpm.StateDocument.State set(int i, x2.orgJpdl3.jbpm.StateDocument.State o)
                {
                    x2.orgJpdl3.jbpm.StateDocument.State old = SuperStateImpl.this.getStateArray(i);
                    SuperStateImpl.this.setStateArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.StateDocument.State o)
                    { SuperStateImpl.this.insertNewState(i).set(o); }
                
                public x2.orgJpdl3.jbpm.StateDocument.State remove(int i)
                {
                    x2.orgJpdl3.jbpm.StateDocument.State old = SuperStateImpl.this.getStateArray(i);
                    SuperStateImpl.this.removeState(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfStateArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new StateList();
            }
        }
        
        /**
         * Gets array of all "state" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.StateDocument.State[] getStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.StateDocument.State> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.StateDocument.State>();
                get_store().find_all_element_users(STATE$2, targetList);
                x2.orgJpdl3.jbpm.StateDocument.State[] result = new x2.orgJpdl3.jbpm.StateDocument.State[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "state" element
         */
        public x2.orgJpdl3.jbpm.StateDocument.State getStateArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.StateDocument.State target = null;
                target = (x2.orgJpdl3.jbpm.StateDocument.State)get_store().find_element_user(STATE$2, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "state" element
         */
        public int sizeOfStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(STATE$2);
            }
        }
        
        /**
         * Sets array of all "state" element
         */
        public void setStateArray(x2.orgJpdl3.jbpm.StateDocument.State[] stateArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(stateArray, STATE$2);
            }
        }
        
        /**
         * Sets ith "state" element
         */
        public void setStateArray(int i, x2.orgJpdl3.jbpm.StateDocument.State state)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.StateDocument.State target = null;
                target = (x2.orgJpdl3.jbpm.StateDocument.State)get_store().find_element_user(STATE$2, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(state);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "state" element
         */
        public x2.orgJpdl3.jbpm.StateDocument.State insertNewState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.StateDocument.State target = null;
                target = (x2.orgJpdl3.jbpm.StateDocument.State)get_store().insert_element_user(STATE$2, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "state" element
         */
        public x2.orgJpdl3.jbpm.StateDocument.State addNewState()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.StateDocument.State target = null;
                target = (x2.orgJpdl3.jbpm.StateDocument.State)get_store().add_element_user(STATE$2);
                return target;
            }
        }
        
        /**
         * Removes the ith "state" element
         */
        public void removeState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(STATE$2, i);
            }
        }
        
        /**
         * Gets a List of "task-node" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode> getTaskNodeList()
        {
            final class TaskNodeList extends java.util.AbstractList<x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode>
            {
                public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode get(int i)
                    { return SuperStateImpl.this.getTaskNodeArray(i); }
                
                public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode set(int i, x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode o)
                {
                    x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode old = SuperStateImpl.this.getTaskNodeArray(i);
                    SuperStateImpl.this.setTaskNodeArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode o)
                    { SuperStateImpl.this.insertNewTaskNode(i).set(o); }
                
                public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode remove(int i)
                {
                    x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode old = SuperStateImpl.this.getTaskNodeArray(i);
                    SuperStateImpl.this.removeTaskNode(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfTaskNodeArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new TaskNodeList();
            }
        }
        
        /**
         * Gets array of all "task-node" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode[] getTaskNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode>();
                get_store().find_all_element_users(TASKNODE$4, targetList);
                x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode[] result = new x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "task-node" element
         */
        public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode getTaskNodeArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode target = null;
                target = (x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode)get_store().find_element_user(TASKNODE$4, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "task-node" element
         */
        public int sizeOfTaskNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TASKNODE$4);
            }
        }
        
        /**
         * Sets array of all "task-node" element
         */
        public void setTaskNodeArray(x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode[] taskNodeArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(taskNodeArray, TASKNODE$4);
            }
        }
        
        /**
         * Sets ith "task-node" element
         */
        public void setTaskNodeArray(int i, x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode taskNode)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode target = null;
                target = (x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode)get_store().find_element_user(TASKNODE$4, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(taskNode);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "task-node" element
         */
        public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode insertNewTaskNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode target = null;
                target = (x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode)get_store().insert_element_user(TASKNODE$4, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "task-node" element
         */
        public x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode addNewTaskNode()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode target = null;
                target = (x2.orgJpdl3.jbpm.TaskNodeDocument.TaskNode)get_store().add_element_user(TASKNODE$4);
                return target;
            }
        }
        
        /**
         * Removes the ith "task-node" element
         */
        public void removeTaskNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TASKNODE$4, i);
            }
        }
        
        /**
         * Gets a List of "super-state" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.SuperStateDocument.SuperState> getSuperStateList()
        {
            final class SuperStateList extends java.util.AbstractList<x2.orgJpdl3.jbpm.SuperStateDocument.SuperState>
            {
                public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState get(int i)
                    { return SuperStateImpl.this.getSuperStateArray(i); }
                
                public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState set(int i, x2.orgJpdl3.jbpm.SuperStateDocument.SuperState o)
                {
                    x2.orgJpdl3.jbpm.SuperStateDocument.SuperState old = SuperStateImpl.this.getSuperStateArray(i);
                    SuperStateImpl.this.setSuperStateArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.SuperStateDocument.SuperState o)
                    { SuperStateImpl.this.insertNewSuperState(i).set(o); }
                
                public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState remove(int i)
                {
                    x2.orgJpdl3.jbpm.SuperStateDocument.SuperState old = SuperStateImpl.this.getSuperStateArray(i);
                    SuperStateImpl.this.removeSuperState(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfSuperStateArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new SuperStateList();
            }
        }
        
        /**
         * Gets array of all "super-state" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState[] getSuperStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.SuperStateDocument.SuperState> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.SuperStateDocument.SuperState>();
                get_store().find_all_element_users(SUPERSTATE$6, targetList);
                x2.orgJpdl3.jbpm.SuperStateDocument.SuperState[] result = new x2.orgJpdl3.jbpm.SuperStateDocument.SuperState[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "super-state" element
         */
        public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState getSuperStateArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
                target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().find_element_user(SUPERSTATE$6, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "super-state" element
         */
        public int sizeOfSuperStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(SUPERSTATE$6);
            }
        }
        
        /**
         * Sets array of all "super-state" element
         */
        public void setSuperStateArray(x2.orgJpdl3.jbpm.SuperStateDocument.SuperState[] superStateArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(superStateArray, SUPERSTATE$6);
            }
        }
        
        /**
         * Sets ith "super-state" element
         */
        public void setSuperStateArray(int i, x2.orgJpdl3.jbpm.SuperStateDocument.SuperState superState)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
                target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().find_element_user(SUPERSTATE$6, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(superState);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "super-state" element
         */
        public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState insertNewSuperState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
                target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().insert_element_user(SUPERSTATE$6, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "super-state" element
         */
        public x2.orgJpdl3.jbpm.SuperStateDocument.SuperState addNewSuperState()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.SuperStateDocument.SuperState target = null;
                target = (x2.orgJpdl3.jbpm.SuperStateDocument.SuperState)get_store().add_element_user(SUPERSTATE$6);
                return target;
            }
        }
        
        /**
         * Removes the ith "super-state" element
         */
        public void removeSuperState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(SUPERSTATE$6, i);
            }
        }
        
        /**
         * Gets a List of "process-state" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState> getProcessStateList()
        {
            final class ProcessStateList extends java.util.AbstractList<x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState>
            {
                public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState get(int i)
                    { return SuperStateImpl.this.getProcessStateArray(i); }
                
                public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState set(int i, x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState o)
                {
                    x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState old = SuperStateImpl.this.getProcessStateArray(i);
                    SuperStateImpl.this.setProcessStateArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState o)
                    { SuperStateImpl.this.insertNewProcessState(i).set(o); }
                
                public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState remove(int i)
                {
                    x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState old = SuperStateImpl.this.getProcessStateArray(i);
                    SuperStateImpl.this.removeProcessState(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfProcessStateArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new ProcessStateList();
            }
        }
        
        /**
         * Gets array of all "process-state" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState[] getProcessStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState>();
                get_store().find_all_element_users(PROCESSSTATE$8, targetList);
                x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState[] result = new x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "process-state" element
         */
        public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState getProcessStateArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState target = null;
                target = (x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState)get_store().find_element_user(PROCESSSTATE$8, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "process-state" element
         */
        public int sizeOfProcessStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(PROCESSSTATE$8);
            }
        }
        
        /**
         * Sets array of all "process-state" element
         */
        public void setProcessStateArray(x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState[] processStateArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(processStateArray, PROCESSSTATE$8);
            }
        }
        
        /**
         * Sets ith "process-state" element
         */
        public void setProcessStateArray(int i, x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState processState)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState target = null;
                target = (x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState)get_store().find_element_user(PROCESSSTATE$8, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(processState);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "process-state" element
         */
        public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState insertNewProcessState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState target = null;
                target = (x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState)get_store().insert_element_user(PROCESSSTATE$8, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "process-state" element
         */
        public x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState addNewProcessState()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState target = null;
                target = (x2.orgJpdl3.jbpm.ProcessStateDocument.ProcessState)get_store().add_element_user(PROCESSSTATE$8);
                return target;
            }
        }
        
        /**
         * Removes the ith "process-state" element
         */
        public void removeProcessState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(PROCESSSTATE$8, i);
            }
        }
        
        /**
         * Gets a List of "fork" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.ForkDocument.Fork> getForkList()
        {
            final class ForkList extends java.util.AbstractList<x2.orgJpdl3.jbpm.ForkDocument.Fork>
            {
                public x2.orgJpdl3.jbpm.ForkDocument.Fork get(int i)
                    { return SuperStateImpl.this.getForkArray(i); }
                
                public x2.orgJpdl3.jbpm.ForkDocument.Fork set(int i, x2.orgJpdl3.jbpm.ForkDocument.Fork o)
                {
                    x2.orgJpdl3.jbpm.ForkDocument.Fork old = SuperStateImpl.this.getForkArray(i);
                    SuperStateImpl.this.setForkArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.ForkDocument.Fork o)
                    { SuperStateImpl.this.insertNewFork(i).set(o); }
                
                public x2.orgJpdl3.jbpm.ForkDocument.Fork remove(int i)
                {
                    x2.orgJpdl3.jbpm.ForkDocument.Fork old = SuperStateImpl.this.getForkArray(i);
                    SuperStateImpl.this.removeFork(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfForkArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new ForkList();
            }
        }
        
        /**
         * Gets array of all "fork" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.ForkDocument.Fork[] getForkArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.ForkDocument.Fork> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.ForkDocument.Fork>();
                get_store().find_all_element_users(FORK$10, targetList);
                x2.orgJpdl3.jbpm.ForkDocument.Fork[] result = new x2.orgJpdl3.jbpm.ForkDocument.Fork[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "fork" element
         */
        public x2.orgJpdl3.jbpm.ForkDocument.Fork getForkArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ForkDocument.Fork target = null;
                target = (x2.orgJpdl3.jbpm.ForkDocument.Fork)get_store().find_element_user(FORK$10, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "fork" element
         */
        public int sizeOfForkArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(FORK$10);
            }
        }
        
        /**
         * Sets array of all "fork" element
         */
        public void setForkArray(x2.orgJpdl3.jbpm.ForkDocument.Fork[] forkArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(forkArray, FORK$10);
            }
        }
        
        /**
         * Sets ith "fork" element
         */
        public void setForkArray(int i, x2.orgJpdl3.jbpm.ForkDocument.Fork fork)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ForkDocument.Fork target = null;
                target = (x2.orgJpdl3.jbpm.ForkDocument.Fork)get_store().find_element_user(FORK$10, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(fork);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "fork" element
         */
        public x2.orgJpdl3.jbpm.ForkDocument.Fork insertNewFork(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ForkDocument.Fork target = null;
                target = (x2.orgJpdl3.jbpm.ForkDocument.Fork)get_store().insert_element_user(FORK$10, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "fork" element
         */
        public x2.orgJpdl3.jbpm.ForkDocument.Fork addNewFork()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ForkDocument.Fork target = null;
                target = (x2.orgJpdl3.jbpm.ForkDocument.Fork)get_store().add_element_user(FORK$10);
                return target;
            }
        }
        
        /**
         * Removes the ith "fork" element
         */
        public void removeFork(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(FORK$10, i);
            }
        }
        
        /**
         * Gets a List of "join" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.JoinDocument.Join> getJoinList()
        {
            final class JoinList extends java.util.AbstractList<x2.orgJpdl3.jbpm.JoinDocument.Join>
            {
                public x2.orgJpdl3.jbpm.JoinDocument.Join get(int i)
                    { return SuperStateImpl.this.getJoinArray(i); }
                
                public x2.orgJpdl3.jbpm.JoinDocument.Join set(int i, x2.orgJpdl3.jbpm.JoinDocument.Join o)
                {
                    x2.orgJpdl3.jbpm.JoinDocument.Join old = SuperStateImpl.this.getJoinArray(i);
                    SuperStateImpl.this.setJoinArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.JoinDocument.Join o)
                    { SuperStateImpl.this.insertNewJoin(i).set(o); }
                
                public x2.orgJpdl3.jbpm.JoinDocument.Join remove(int i)
                {
                    x2.orgJpdl3.jbpm.JoinDocument.Join old = SuperStateImpl.this.getJoinArray(i);
                    SuperStateImpl.this.removeJoin(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfJoinArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new JoinList();
            }
        }
        
        /**
         * Gets array of all "join" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.JoinDocument.Join[] getJoinArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.JoinDocument.Join> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.JoinDocument.Join>();
                get_store().find_all_element_users(JOIN$12, targetList);
                x2.orgJpdl3.jbpm.JoinDocument.Join[] result = new x2.orgJpdl3.jbpm.JoinDocument.Join[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "join" element
         */
        public x2.orgJpdl3.jbpm.JoinDocument.Join getJoinArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.JoinDocument.Join target = null;
                target = (x2.orgJpdl3.jbpm.JoinDocument.Join)get_store().find_element_user(JOIN$12, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "join" element
         */
        public int sizeOfJoinArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(JOIN$12);
            }
        }
        
        /**
         * Sets array of all "join" element
         */
        public void setJoinArray(x2.orgJpdl3.jbpm.JoinDocument.Join[] joinArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(joinArray, JOIN$12);
            }
        }
        
        /**
         * Sets ith "join" element
         */
        public void setJoinArray(int i, x2.orgJpdl3.jbpm.JoinDocument.Join join)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.JoinDocument.Join target = null;
                target = (x2.orgJpdl3.jbpm.JoinDocument.Join)get_store().find_element_user(JOIN$12, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(join);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "join" element
         */
        public x2.orgJpdl3.jbpm.JoinDocument.Join insertNewJoin(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.JoinDocument.Join target = null;
                target = (x2.orgJpdl3.jbpm.JoinDocument.Join)get_store().insert_element_user(JOIN$12, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "join" element
         */
        public x2.orgJpdl3.jbpm.JoinDocument.Join addNewJoin()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.JoinDocument.Join target = null;
                target = (x2.orgJpdl3.jbpm.JoinDocument.Join)get_store().add_element_user(JOIN$12);
                return target;
            }
        }
        
        /**
         * Removes the ith "join" element
         */
        public void removeJoin(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(JOIN$12, i);
            }
        }
        
        /**
         * Gets a List of "decision" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.DecisionDocument.Decision> getDecisionList()
        {
            final class DecisionList extends java.util.AbstractList<x2.orgJpdl3.jbpm.DecisionDocument.Decision>
            {
                public x2.orgJpdl3.jbpm.DecisionDocument.Decision get(int i)
                    { return SuperStateImpl.this.getDecisionArray(i); }
                
                public x2.orgJpdl3.jbpm.DecisionDocument.Decision set(int i, x2.orgJpdl3.jbpm.DecisionDocument.Decision o)
                {
                    x2.orgJpdl3.jbpm.DecisionDocument.Decision old = SuperStateImpl.this.getDecisionArray(i);
                    SuperStateImpl.this.setDecisionArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.DecisionDocument.Decision o)
                    { SuperStateImpl.this.insertNewDecision(i).set(o); }
                
                public x2.orgJpdl3.jbpm.DecisionDocument.Decision remove(int i)
                {
                    x2.orgJpdl3.jbpm.DecisionDocument.Decision old = SuperStateImpl.this.getDecisionArray(i);
                    SuperStateImpl.this.removeDecision(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfDecisionArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new DecisionList();
            }
        }
        
        /**
         * Gets array of all "decision" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.DecisionDocument.Decision[] getDecisionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.DecisionDocument.Decision> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.DecisionDocument.Decision>();
                get_store().find_all_element_users(DECISION$14, targetList);
                x2.orgJpdl3.jbpm.DecisionDocument.Decision[] result = new x2.orgJpdl3.jbpm.DecisionDocument.Decision[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "decision" element
         */
        public x2.orgJpdl3.jbpm.DecisionDocument.Decision getDecisionArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.DecisionDocument.Decision target = null;
                target = (x2.orgJpdl3.jbpm.DecisionDocument.Decision)get_store().find_element_user(DECISION$14, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "decision" element
         */
        public int sizeOfDecisionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(DECISION$14);
            }
        }
        
        /**
         * Sets array of all "decision" element
         */
        public void setDecisionArray(x2.orgJpdl3.jbpm.DecisionDocument.Decision[] decisionArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(decisionArray, DECISION$14);
            }
        }
        
        /**
         * Sets ith "decision" element
         */
        public void setDecisionArray(int i, x2.orgJpdl3.jbpm.DecisionDocument.Decision decision)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.DecisionDocument.Decision target = null;
                target = (x2.orgJpdl3.jbpm.DecisionDocument.Decision)get_store().find_element_user(DECISION$14, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(decision);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "decision" element
         */
        public x2.orgJpdl3.jbpm.DecisionDocument.Decision insertNewDecision(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.DecisionDocument.Decision target = null;
                target = (x2.orgJpdl3.jbpm.DecisionDocument.Decision)get_store().insert_element_user(DECISION$14, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "decision" element
         */
        public x2.orgJpdl3.jbpm.DecisionDocument.Decision addNewDecision()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.DecisionDocument.Decision target = null;
                target = (x2.orgJpdl3.jbpm.DecisionDocument.Decision)get_store().add_element_user(DECISION$14);
                return target;
            }
        }
        
        /**
         * Removes the ith "decision" element
         */
        public void removeDecision(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(DECISION$14, i);
            }
        }
        
        /**
         * Gets a List of "end-state" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.EndStateDocument.EndState> getEndStateList()
        {
            final class EndStateList extends java.util.AbstractList<x2.orgJpdl3.jbpm.EndStateDocument.EndState>
            {
                public x2.orgJpdl3.jbpm.EndStateDocument.EndState get(int i)
                    { return SuperStateImpl.this.getEndStateArray(i); }
                
                public x2.orgJpdl3.jbpm.EndStateDocument.EndState set(int i, x2.orgJpdl3.jbpm.EndStateDocument.EndState o)
                {
                    x2.orgJpdl3.jbpm.EndStateDocument.EndState old = SuperStateImpl.this.getEndStateArray(i);
                    SuperStateImpl.this.setEndStateArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.EndStateDocument.EndState o)
                    { SuperStateImpl.this.insertNewEndState(i).set(o); }
                
                public x2.orgJpdl3.jbpm.EndStateDocument.EndState remove(int i)
                {
                    x2.orgJpdl3.jbpm.EndStateDocument.EndState old = SuperStateImpl.this.getEndStateArray(i);
                    SuperStateImpl.this.removeEndState(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfEndStateArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new EndStateList();
            }
        }
        
        /**
         * Gets array of all "end-state" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.EndStateDocument.EndState[] getEndStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.EndStateDocument.EndState> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.EndStateDocument.EndState>();
                get_store().find_all_element_users(ENDSTATE$16, targetList);
                x2.orgJpdl3.jbpm.EndStateDocument.EndState[] result = new x2.orgJpdl3.jbpm.EndStateDocument.EndState[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "end-state" element
         */
        public x2.orgJpdl3.jbpm.EndStateDocument.EndState getEndStateArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EndStateDocument.EndState target = null;
                target = (x2.orgJpdl3.jbpm.EndStateDocument.EndState)get_store().find_element_user(ENDSTATE$16, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "end-state" element
         */
        public int sizeOfEndStateArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(ENDSTATE$16);
            }
        }
        
        /**
         * Sets array of all "end-state" element
         */
        public void setEndStateArray(x2.orgJpdl3.jbpm.EndStateDocument.EndState[] endStateArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(endStateArray, ENDSTATE$16);
            }
        }
        
        /**
         * Sets ith "end-state" element
         */
        public void setEndStateArray(int i, x2.orgJpdl3.jbpm.EndStateDocument.EndState endState)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EndStateDocument.EndState target = null;
                target = (x2.orgJpdl3.jbpm.EndStateDocument.EndState)get_store().find_element_user(ENDSTATE$16, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(endState);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "end-state" element
         */
        public x2.orgJpdl3.jbpm.EndStateDocument.EndState insertNewEndState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EndStateDocument.EndState target = null;
                target = (x2.orgJpdl3.jbpm.EndStateDocument.EndState)get_store().insert_element_user(ENDSTATE$16, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "end-state" element
         */
        public x2.orgJpdl3.jbpm.EndStateDocument.EndState addNewEndState()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EndStateDocument.EndState target = null;
                target = (x2.orgJpdl3.jbpm.EndStateDocument.EndState)get_store().add_element_user(ENDSTATE$16);
                return target;
            }
        }
        
        /**
         * Removes the ith "end-state" element
         */
        public void removeEndState(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(ENDSTATE$16, i);
            }
        }
        
        /**
         * Gets a List of "mail-node" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.MailNodeDocument.MailNode> getMailNodeList()
        {
            final class MailNodeList extends java.util.AbstractList<x2.orgJpdl3.jbpm.MailNodeDocument.MailNode>
            {
                public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode get(int i)
                    { return SuperStateImpl.this.getMailNodeArray(i); }
                
                public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode set(int i, x2.orgJpdl3.jbpm.MailNodeDocument.MailNode o)
                {
                    x2.orgJpdl3.jbpm.MailNodeDocument.MailNode old = SuperStateImpl.this.getMailNodeArray(i);
                    SuperStateImpl.this.setMailNodeArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.MailNodeDocument.MailNode o)
                    { SuperStateImpl.this.insertNewMailNode(i).set(o); }
                
                public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode remove(int i)
                {
                    x2.orgJpdl3.jbpm.MailNodeDocument.MailNode old = SuperStateImpl.this.getMailNodeArray(i);
                    SuperStateImpl.this.removeMailNode(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfMailNodeArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new MailNodeList();
            }
        }
        
        /**
         * Gets array of all "mail-node" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode[] getMailNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.MailNodeDocument.MailNode> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.MailNodeDocument.MailNode>();
                get_store().find_all_element_users(MAILNODE$18, targetList);
                x2.orgJpdl3.jbpm.MailNodeDocument.MailNode[] result = new x2.orgJpdl3.jbpm.MailNodeDocument.MailNode[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "mail-node" element
         */
        public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode getMailNodeArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.MailNodeDocument.MailNode target = null;
                target = (x2.orgJpdl3.jbpm.MailNodeDocument.MailNode)get_store().find_element_user(MAILNODE$18, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "mail-node" element
         */
        public int sizeOfMailNodeArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(MAILNODE$18);
            }
        }
        
        /**
         * Sets array of all "mail-node" element
         */
        public void setMailNodeArray(x2.orgJpdl3.jbpm.MailNodeDocument.MailNode[] mailNodeArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(mailNodeArray, MAILNODE$18);
            }
        }
        
        /**
         * Sets ith "mail-node" element
         */
        public void setMailNodeArray(int i, x2.orgJpdl3.jbpm.MailNodeDocument.MailNode mailNode)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.MailNodeDocument.MailNode target = null;
                target = (x2.orgJpdl3.jbpm.MailNodeDocument.MailNode)get_store().find_element_user(MAILNODE$18, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(mailNode);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "mail-node" element
         */
        public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode insertNewMailNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.MailNodeDocument.MailNode target = null;
                target = (x2.orgJpdl3.jbpm.MailNodeDocument.MailNode)get_store().insert_element_user(MAILNODE$18, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "mail-node" element
         */
        public x2.orgJpdl3.jbpm.MailNodeDocument.MailNode addNewMailNode()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.MailNodeDocument.MailNode target = null;
                target = (x2.orgJpdl3.jbpm.MailNodeDocument.MailNode)get_store().add_element_user(MAILNODE$18);
                return target;
            }
        }
        
        /**
         * Removes the ith "mail-node" element
         */
        public void removeMailNode(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(MAILNODE$18, i);
            }
        }
        
        /**
         * Gets a List of "description" elements
         */
        public java.util.List<java.lang.String> getDescriptionList()
        {
            final class DescriptionList extends java.util.AbstractList<java.lang.String>
            {
                public java.lang.String get(int i)
                    { return SuperStateImpl.this.getDescriptionArray(i); }
                
                public java.lang.String set(int i, java.lang.String o)
                {
                    java.lang.String old = SuperStateImpl.this.getDescriptionArray(i);
                    SuperStateImpl.this.setDescriptionArray(i, o);
                    return old;
                }
                
                public void add(int i, java.lang.String o)
                    { SuperStateImpl.this.insertDescription(i, o); }
                
                public java.lang.String remove(int i)
                {
                    java.lang.String old = SuperStateImpl.this.getDescriptionArray(i);
                    SuperStateImpl.this.removeDescription(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfDescriptionArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new DescriptionList();
            }
        }
        
        /**
         * Gets array of all "description" elements
         * @deprecated
         */
        public java.lang.String[] getDescriptionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<org.apache.xmlbeans.XmlString> targetList = new java.util.ArrayList<org.apache.xmlbeans.XmlString>();
                get_store().find_all_element_users(DESCRIPTION$20, targetList);
                java.lang.String[] result = new java.lang.String[targetList.size()];
                for (int i = 0, len = targetList.size() ; i < len ; i++)
                    result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
                return result;
            }
        }
        
        /**
         * Gets ith "description" element
         */
        public java.lang.String getDescriptionArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESCRIPTION$20, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) a List of "description" elements
         */
        public java.util.List<org.apache.xmlbeans.XmlString> xgetDescriptionList()
        {
            final class DescriptionList extends java.util.AbstractList<org.apache.xmlbeans.XmlString>
            {
                public org.apache.xmlbeans.XmlString get(int i)
                    { return SuperStateImpl.this.xgetDescriptionArray(i); }
                
                public org.apache.xmlbeans.XmlString set(int i, org.apache.xmlbeans.XmlString o)
                {
                    org.apache.xmlbeans.XmlString old = SuperStateImpl.this.xgetDescriptionArray(i);
                    SuperStateImpl.this.xsetDescriptionArray(i, o);
                    return old;
                }
                
                public void add(int i, org.apache.xmlbeans.XmlString o)
                    { SuperStateImpl.this.insertNewDescription(i).set(o); }
                
                public org.apache.xmlbeans.XmlString remove(int i)
                {
                    org.apache.xmlbeans.XmlString old = SuperStateImpl.this.xgetDescriptionArray(i);
                    SuperStateImpl.this.removeDescription(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfDescriptionArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new DescriptionList();
            }
        }
        
        /**
         * Gets array of all "description" elements
         * @deprecated
         */
        public org.apache.xmlbeans.XmlString[] xgetDescriptionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<org.apache.xmlbeans.XmlString> targetList = new java.util.ArrayList<org.apache.xmlbeans.XmlString>();
                get_store().find_all_element_users(DESCRIPTION$20, targetList);
                org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets (as xml) ith "description" element
         */
        public org.apache.xmlbeans.XmlString xgetDescriptionArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DESCRIPTION$20, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return (org.apache.xmlbeans.XmlString)target;
            }
        }
        
        /**
         * Returns number of "description" element
         */
        public int sizeOfDescriptionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(DESCRIPTION$20);
            }
        }
        
        /**
         * Sets array of all "description" element
         */
        public void setDescriptionArray(java.lang.String[] descriptionArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(descriptionArray, DESCRIPTION$20);
            }
        }
        
        /**
         * Sets ith "description" element
         */
        public void setDescriptionArray(int i, java.lang.String description)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESCRIPTION$20, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.setStringValue(description);
            }
        }
        
        /**
         * Sets (as xml) array of all "description" element
         */
        public void xsetDescriptionArray(org.apache.xmlbeans.XmlString[]descriptionArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(descriptionArray, DESCRIPTION$20);
            }
        }
        
        /**
         * Sets (as xml) ith "description" element
         */
        public void xsetDescriptionArray(int i, org.apache.xmlbeans.XmlString description)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DESCRIPTION$20, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(description);
            }
        }
        
        /**
         * Inserts the value as the ith "description" element
         */
        public void insertDescription(int i, java.lang.String description)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = 
                    (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(DESCRIPTION$20, i);
                target.setStringValue(description);
            }
        }
        
        /**
         * Appends the value as the last "description" element
         */
        public void addDescription(java.lang.String description)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DESCRIPTION$20);
                target.setStringValue(description);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "description" element
         */
        public org.apache.xmlbeans.XmlString insertNewDescription(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(DESCRIPTION$20, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "description" element
         */
        public org.apache.xmlbeans.XmlString addNewDescription()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(DESCRIPTION$20);
                return target;
            }
        }
        
        /**
         * Removes the ith "description" element
         */
        public void removeDescription(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(DESCRIPTION$20, i);
            }
        }
        
        /**
         * Gets a List of "event" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.EventDocument.Event> getEventList()
        {
            final class EventList extends java.util.AbstractList<x2.orgJpdl3.jbpm.EventDocument.Event>
            {
                public x2.orgJpdl3.jbpm.EventDocument.Event get(int i)
                    { return SuperStateImpl.this.getEventArray(i); }
                
                public x2.orgJpdl3.jbpm.EventDocument.Event set(int i, x2.orgJpdl3.jbpm.EventDocument.Event o)
                {
                    x2.orgJpdl3.jbpm.EventDocument.Event old = SuperStateImpl.this.getEventArray(i);
                    SuperStateImpl.this.setEventArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.EventDocument.Event o)
                    { SuperStateImpl.this.insertNewEvent(i).set(o); }
                
                public x2.orgJpdl3.jbpm.EventDocument.Event remove(int i)
                {
                    x2.orgJpdl3.jbpm.EventDocument.Event old = SuperStateImpl.this.getEventArray(i);
                    SuperStateImpl.this.removeEvent(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfEventArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new EventList();
            }
        }
        
        /**
         * Gets array of all "event" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.EventDocument.Event[] getEventArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.EventDocument.Event> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.EventDocument.Event>();
                get_store().find_all_element_users(EVENT$22, targetList);
                x2.orgJpdl3.jbpm.EventDocument.Event[] result = new x2.orgJpdl3.jbpm.EventDocument.Event[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "event" element
         */
        public x2.orgJpdl3.jbpm.EventDocument.Event getEventArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EventDocument.Event target = null;
                target = (x2.orgJpdl3.jbpm.EventDocument.Event)get_store().find_element_user(EVENT$22, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "event" element
         */
        public int sizeOfEventArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(EVENT$22);
            }
        }
        
        /**
         * Sets array of all "event" element
         */
        public void setEventArray(x2.orgJpdl3.jbpm.EventDocument.Event[] eventArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(eventArray, EVENT$22);
            }
        }
        
        /**
         * Sets ith "event" element
         */
        public void setEventArray(int i, x2.orgJpdl3.jbpm.EventDocument.Event event)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EventDocument.Event target = null;
                target = (x2.orgJpdl3.jbpm.EventDocument.Event)get_store().find_element_user(EVENT$22, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(event);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "event" element
         */
        public x2.orgJpdl3.jbpm.EventDocument.Event insertNewEvent(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EventDocument.Event target = null;
                target = (x2.orgJpdl3.jbpm.EventDocument.Event)get_store().insert_element_user(EVENT$22, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "event" element
         */
        public x2.orgJpdl3.jbpm.EventDocument.Event addNewEvent()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.EventDocument.Event target = null;
                target = (x2.orgJpdl3.jbpm.EventDocument.Event)get_store().add_element_user(EVENT$22);
                return target;
            }
        }
        
        /**
         * Removes the ith "event" element
         */
        public void removeEvent(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(EVENT$22, i);
            }
        }
        
        /**
         * Gets a List of "exception-handler" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler> getExceptionHandlerList()
        {
            final class ExceptionHandlerList extends java.util.AbstractList<x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler>
            {
                public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler get(int i)
                    { return SuperStateImpl.this.getExceptionHandlerArray(i); }
                
                public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler set(int i, x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler o)
                {
                    x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler old = SuperStateImpl.this.getExceptionHandlerArray(i);
                    SuperStateImpl.this.setExceptionHandlerArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler o)
                    { SuperStateImpl.this.insertNewExceptionHandler(i).set(o); }
                
                public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler remove(int i)
                {
                    x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler old = SuperStateImpl.this.getExceptionHandlerArray(i);
                    SuperStateImpl.this.removeExceptionHandler(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfExceptionHandlerArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new ExceptionHandlerList();
            }
        }
        
        /**
         * Gets array of all "exception-handler" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler[] getExceptionHandlerArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler>();
                get_store().find_all_element_users(EXCEPTIONHANDLER$24, targetList);
                x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler[] result = new x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "exception-handler" element
         */
        public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler getExceptionHandlerArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler target = null;
                target = (x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler)get_store().find_element_user(EXCEPTIONHANDLER$24, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "exception-handler" element
         */
        public int sizeOfExceptionHandlerArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(EXCEPTIONHANDLER$24);
            }
        }
        
        /**
         * Sets array of all "exception-handler" element
         */
        public void setExceptionHandlerArray(x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler[] exceptionHandlerArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(exceptionHandlerArray, EXCEPTIONHANDLER$24);
            }
        }
        
        /**
         * Sets ith "exception-handler" element
         */
        public void setExceptionHandlerArray(int i, x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler exceptionHandler)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler target = null;
                target = (x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler)get_store().find_element_user(EXCEPTIONHANDLER$24, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(exceptionHandler);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "exception-handler" element
         */
        public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler insertNewExceptionHandler(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler target = null;
                target = (x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler)get_store().insert_element_user(EXCEPTIONHANDLER$24, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "exception-handler" element
         */
        public x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler addNewExceptionHandler()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler target = null;
                target = (x2.orgJpdl3.jbpm.ExceptionHandlerDocument.ExceptionHandler)get_store().add_element_user(EXCEPTIONHANDLER$24);
                return target;
            }
        }
        
        /**
         * Removes the ith "exception-handler" element
         */
        public void removeExceptionHandler(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(EXCEPTIONHANDLER$24, i);
            }
        }
        
        /**
         * Gets a List of "timer" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.TimerDocument.Timer> getTimerList()
        {
            final class TimerList extends java.util.AbstractList<x2.orgJpdl3.jbpm.TimerDocument.Timer>
            {
                public x2.orgJpdl3.jbpm.TimerDocument.Timer get(int i)
                    { return SuperStateImpl.this.getTimerArray(i); }
                
                public x2.orgJpdl3.jbpm.TimerDocument.Timer set(int i, x2.orgJpdl3.jbpm.TimerDocument.Timer o)
                {
                    x2.orgJpdl3.jbpm.TimerDocument.Timer old = SuperStateImpl.this.getTimerArray(i);
                    SuperStateImpl.this.setTimerArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.TimerDocument.Timer o)
                    { SuperStateImpl.this.insertNewTimer(i).set(o); }
                
                public x2.orgJpdl3.jbpm.TimerDocument.Timer remove(int i)
                {
                    x2.orgJpdl3.jbpm.TimerDocument.Timer old = SuperStateImpl.this.getTimerArray(i);
                    SuperStateImpl.this.removeTimer(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfTimerArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new TimerList();
            }
        }
        
        /**
         * Gets array of all "timer" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.TimerDocument.Timer[] getTimerArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.TimerDocument.Timer> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.TimerDocument.Timer>();
                get_store().find_all_element_users(TIMER$26, targetList);
                x2.orgJpdl3.jbpm.TimerDocument.Timer[] result = new x2.orgJpdl3.jbpm.TimerDocument.Timer[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "timer" element
         */
        public x2.orgJpdl3.jbpm.TimerDocument.Timer getTimerArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
                target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().find_element_user(TIMER$26, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "timer" element
         */
        public int sizeOfTimerArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TIMER$26);
            }
        }
        
        /**
         * Sets array of all "timer" element
         */
        public void setTimerArray(x2.orgJpdl3.jbpm.TimerDocument.Timer[] timerArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(timerArray, TIMER$26);
            }
        }
        
        /**
         * Sets ith "timer" element
         */
        public void setTimerArray(int i, x2.orgJpdl3.jbpm.TimerDocument.Timer timer)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
                target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().find_element_user(TIMER$26, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(timer);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "timer" element
         */
        public x2.orgJpdl3.jbpm.TimerDocument.Timer insertNewTimer(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
                target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().insert_element_user(TIMER$26, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "timer" element
         */
        public x2.orgJpdl3.jbpm.TimerDocument.Timer addNewTimer()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
                target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().add_element_user(TIMER$26);
                return target;
            }
        }
        
        /**
         * Removes the ith "timer" element
         */
        public void removeTimer(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TIMER$26, i);
            }
        }
        
        /**
         * Gets a List of "transition" elements
         */
        public java.util.List<x2.orgJpdl3.jbpm.TransitionDocument.Transition> getTransitionList()
        {
            final class TransitionList extends java.util.AbstractList<x2.orgJpdl3.jbpm.TransitionDocument.Transition>
            {
                public x2.orgJpdl3.jbpm.TransitionDocument.Transition get(int i)
                    { return SuperStateImpl.this.getTransitionArray(i); }
                
                public x2.orgJpdl3.jbpm.TransitionDocument.Transition set(int i, x2.orgJpdl3.jbpm.TransitionDocument.Transition o)
                {
                    x2.orgJpdl3.jbpm.TransitionDocument.Transition old = SuperStateImpl.this.getTransitionArray(i);
                    SuperStateImpl.this.setTransitionArray(i, o);
                    return old;
                }
                
                public void add(int i, x2.orgJpdl3.jbpm.TransitionDocument.Transition o)
                    { SuperStateImpl.this.insertNewTransition(i).set(o); }
                
                public x2.orgJpdl3.jbpm.TransitionDocument.Transition remove(int i)
                {
                    x2.orgJpdl3.jbpm.TransitionDocument.Transition old = SuperStateImpl.this.getTransitionArray(i);
                    SuperStateImpl.this.removeTransition(i);
                    return old;
                }
                
                public int size()
                    { return SuperStateImpl.this.sizeOfTransitionArray(); }
                
            }
            
            synchronized (monitor())
            {
                check_orphaned();
                return new TransitionList();
            }
        }
        
        /**
         * Gets array of all "transition" elements
         * @deprecated
         */
        public x2.orgJpdl3.jbpm.TransitionDocument.Transition[] getTransitionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List<x2.orgJpdl3.jbpm.TransitionDocument.Transition> targetList = new java.util.ArrayList<x2.orgJpdl3.jbpm.TransitionDocument.Transition>();
                get_store().find_all_element_users(TRANSITION$28, targetList);
                x2.orgJpdl3.jbpm.TransitionDocument.Transition[] result = new x2.orgJpdl3.jbpm.TransitionDocument.Transition[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "transition" element
         */
        public x2.orgJpdl3.jbpm.TransitionDocument.Transition getTransitionArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TransitionDocument.Transition target = null;
                target = (x2.orgJpdl3.jbpm.TransitionDocument.Transition)get_store().find_element_user(TRANSITION$28, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "transition" element
         */
        public int sizeOfTransitionArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TRANSITION$28);
            }
        }
        
        /**
         * Sets array of all "transition" element
         */
        public void setTransitionArray(x2.orgJpdl3.jbpm.TransitionDocument.Transition[] transitionArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(transitionArray, TRANSITION$28);
            }
        }
        
        /**
         * Sets ith "transition" element
         */
        public void setTransitionArray(int i, x2.orgJpdl3.jbpm.TransitionDocument.Transition transition)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TransitionDocument.Transition target = null;
                target = (x2.orgJpdl3.jbpm.TransitionDocument.Transition)get_store().find_element_user(TRANSITION$28, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(transition);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "transition" element
         */
        public x2.orgJpdl3.jbpm.TransitionDocument.Transition insertNewTransition(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TransitionDocument.Transition target = null;
                target = (x2.orgJpdl3.jbpm.TransitionDocument.Transition)get_store().insert_element_user(TRANSITION$28, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "transition" element
         */
        public x2.orgJpdl3.jbpm.TransitionDocument.Transition addNewTransition()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.TransitionDocument.Transition target = null;
                target = (x2.orgJpdl3.jbpm.TransitionDocument.Transition)get_store().add_element_user(TRANSITION$28);
                return target;
            }
        }
        
        /**
         * Removes the ith "transition" element
         */
        public void removeTransition(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TRANSITION$28, i);
            }
        }
        
        /**
         * Gets the "name" attribute
         */
        public java.lang.String getName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$30);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "name" attribute
         */
        public org.apache.xmlbeans.XmlString xgetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$30);
                return target;
            }
        }
        
        /**
         * Sets the "name" attribute
         */
        public void setName(java.lang.String name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$30);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$30);
                }
                target.setStringValue(name);
            }
        }
        
        /**
         * Sets (as xml) the "name" attribute
         */
        public void xsetName(org.apache.xmlbeans.XmlString name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$30);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$30);
                }
                target.set(name);
            }
        }
        
        /**
         * Gets the "async" attribute
         */
        public java.lang.String getAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ASYNC$32);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(ASYNC$32);
                }
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "async" attribute
         */
        public org.apache.xmlbeans.XmlString xgetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ASYNC$32);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_default_attribute_value(ASYNC$32);
                }
                return target;
            }
        }
        
        /**
         * True if has "async" attribute
         */
        public boolean isSetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ASYNC$32) != null;
            }
        }
        
        /**
         * Sets the "async" attribute
         */
        public void setAsync(java.lang.String async)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ASYNC$32);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ASYNC$32);
                }
                target.setStringValue(async);
            }
        }
        
        /**
         * Sets (as xml) the "async" attribute
         */
        public void xsetAsync(org.apache.xmlbeans.XmlString async)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ASYNC$32);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ASYNC$32);
                }
                target.set(async);
            }
        }
        
        /**
         * Unsets the "async" attribute
         */
        public void unsetAsync()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ASYNC$32);
            }
        }
    }
}
